import math
import numpy 

import morse

class Morse:

    def __init__(self, d = 0.2703, a = 1.1646, r0 = 3.253):
        self.d = d
        self.a = a
        self.r0 = r0
    
    def energy(self, s):
        s.u = morse.energy(s.r.ravel().tolist(), self.d, self.a, self.r0)

    def force(self, s):
        f = morse.force(s.r.ravel().tolist(), self.d, self.a, self.r0)
        s.f = numpy.array(f).reshape((len(f)/3, 3))
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        


    


